<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    


    <script>
        //50年的薪资是多少
        //每年涨幅5%
        var xinshui = 10000;
        for(var i = 1; i<= 50; i++){
            xinshui += xinshui*0.05;
        }
        console.log(xinshui)
    </script>

    <script>
        //50年的薪资是多少
        //每年涨幅5%
        var to = 10000;
        var con = 0;
        while(con < 50){
            to = to + to*0.05
            con = con + 1
        }
        console.log(to)
    </script>

    <script>
        //50年的薪资是多少
        //每年涨幅5%
        var gz = 10000;
        var arr = 0;
        var zf = 0.05
        while(arr < 50){
            gz = (zf * gz) + gz;
            arr++
        }
        document.write(gz)
    </script>
</body>
</html>